package com.macro.mall.controller;

import com.macro.mall.common.api.CommonResuIt;
import com.macro.mall.model.CmsPrefrenceArea;
import com.macro.mall.service.CmsPrefrenceAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/prefrenceArea")
public class CmsPrefrenceAreaController {
    @Autowired
    private CmsPrefrenceAreaService cmsPrefrenceAreaService;

    @RequestMapping(value = "/listAll", method = RequestMethod.GET)
    @ResponseBody
    public CommonResuIt<List<CmsPrefrenceArea>> listAll() {
    List<CmsPrefrenceArea> prefrenceAreaList = cmsPrefrenceAreaService.listAll();
    return CommonResuIt.success(prefrenceAreaList);
}
}
